<!--
 * @Author: zjj
 * @Date: 2019-11-26 13:22:55
 * @LastEditors: zjj
 * @LastEditTime: 2019-11-26 13:49:04
 -->
<!--  -->
<template>
  <div class="mask" @click="$emit('closeAds')" >
    <div class="content" @click.stop>
      <div class="share-btn flex justify-center f-14 f-bold" @click="$emit('shareActivity')">立即邀请</div>
      <span class="close-icon" @click="$emit('closeAds')"></span>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    shareFlag: {
      type: Boolean,
      default: () => {
        return false;
      }
    }
  },
  data() {
    return {};
  },
  computed: {},
  watch: {},
  methods: {},
  created() {},
  mounted() {},
  updated() {}, //生命周期 - 更新之后
  destroyed() {} //生命周期 - 销毁完成
};
</script>
<style lang='less' scoped>
//@import url(); 引入公共css类
.mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  z-index: 998;
  &::before {
    content: "";
    display: inline-block;
    vertical-align: middle;
    height: 100%;
  }
}
.content {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  z-index: 998;
  width: 323px;
  height: 321px;
  border-radius: 5px;
  background: url("../assets/imgs/share-dialog.png");
  background-size: 100% 100%;
  animation: show 0.3s 1;
  box-shadow: 14px 25px 16px 7px rgba(0, 0, 0, 0.05);
  @keyframes show {
    0% {
      opacity: 0;
      transform: scale(1.5);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }
}

.close-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 18px;
  height: 18px;
  background: url("../assets/imgs/close.png");
  background-size: 100% 100%;
}
.share-btn{
  position: absolute;
  top: 216px;
  left: 53%;
  transform: translateX(-50%);
  width: 83px;
  height: 40px;
  line-height: 30px;
  background: url("../assets/imgs/share-btn.png");
  background-size: 100% 100%;
}
</style>